//
//  XYLogin.m
//  
//
//  Created by xmy on 2017/3/1.
//
//

#import "XYLogin.h"

@implementation XYLogin

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI{

    UITextField *iphoneNumber = [[UITextField alloc]init];
    
    [self addSubview:iphoneNumber];
    
    UITextField *testNumber = [[UITextField alloc]init];
    
    [self addSubview:testNumber];
    
    [iphoneNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self).offset(10);
        make.height.offset(20);
    }];
    [testNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(iphoneNumber).offset(10);
        make.left.right.equalTo(iphoneNumber);
        make.height.offset(20);
    }];
    
    UIButton *login = [[UIButton alloc]init];
    
    login.backgroundColor = [UIColor whiteColor];
    login.titleLabel.text = @"登录";
    [login addTarget:self action:@selector(login) forControlEvents:UIControlEventTouchUpInside];
}

- (void)login{
    
}
@end
